com.android.contacts
Interface PinnedHeaderListView.PinnedHeaderAdapter

Enclosing class:
PinnedHeaderListView

public static interface PinnedHeaderListView.PinnedHeaderAdapter

Adapter interface. The list adapter must implement this interface.


Field Summary
static int PINNED_HEADER_GONE
          Pinned header state: don't show the header.
static int PINNED_HEADER_PUSHED_UP
          Pinned header state: show the header.
static int PINNED_HEADER_VISIBLE
          Pinned header state: show the header at the top of the list.
 
Method Summary
 void configurePinnedHeader(android.view.View header, int position, int alpha)
          Configures the pinned header view to match the first visible list item.
 int getPinnedHeaderState(int position)
          Computes the desired state of the pinned header for the given position of the first visible list item.
 

Field Detail

PINNED_HEADER_GONE

static final int PINNED_HEADER_GONE
Pinned header state: don't show the header.

See Also:
Constant Field Values

PINNED_HEADER_VISIBLE

static final int PINNED_HEADER_VISIBLE
Pinned header state: show the header at the top of the list.

See Also:
Constant Field Values

PINNED_HEADER_PUSHED_UP

static final int PINNED_HEADER_PUSHED_UP
Pinned header state: show the header. If the header extends beyond the bottom of the first shown element, push it up and clip.

See Also:
Constant Field Values
Method Detail

getPinnedHeaderState

int getPinnedHeaderState(int position)
Computes the desired state of the pinned header for the given position of the first visible list item. Allowed return values are PINNED_HEADER_GONE, PINNED_HEADER_VISIBLE or PINNED_HEADER_PUSHED_UP.


configurePinnedHeader

void configurePinnedHeader(android.view.View header,
                           int position,
                           int alpha)
Configures the pinned header view to match the first visible list item.

Parameters:
header - pinned header view.
position - position of the first visible list item.
alpha - fading of the header view, between 0 and 255.


Copyright © 2011. All Rights Reserved.